package com.wtwd.campus.common;


/**
 * 常量类
 */
public final class Constants {

    // 设备通讯数据的编码
    public static final String DEVICE_DATA_CHARSET = "utf-8";


    public static final String MANAGER_TOKEN_PREFIX = "WEBUSER_";  // 后台token的前缀
    public static final long TOKEN_EXPIRE = 3000L;     // token过期时间  30分钟
    public static final String HEADER_TOKEN_KEY = "Manager-Token";     // 请求头部的token的key
    public static final long WXTOKEN_EXPIRE = 1L;   // 微信token过期时间  1天
    public static final String WX_SMS_CODE_PREFIX = "WX_SMS_";   // 微信短信验证码token
    public static final long SMS_EXPIRE = 2L;   // 短信过期时间  2分钟
    public static final long OFF_LINE_TIME = 5 * 60 * 1000;//设备过期时间5分钟
    public static final String WX_HEADER_TOKEN_KEY = "Access-Token";     // 微信请求头部的token的key

    public static final String WX_APP_ID = "wxb70939670a55edb7";  // appID
    public static final String WX_APP_SECRET = "44865d98a5b43332e26e1ab9a1b56115";  // Secret

    //喜马拉雅
    public static final String WX_APP_ID_XMLY = "wx4c595df7d3e8f309";  // appID
    public static final String WX_APP_SECRET_XMLY = "0d906056287addbb10229d4e57c31e96";  // Secret


    // 阿里云相关
    public static final String ALI_REGION_ID = "cn-hangzhou";   //regionId
    public static final String ALI_PRODUCT = "Dysmsapi";    // 产品：云短信
    public static final String ALI_DOMAIN = "dysmsapi.aliyuncs.com"; // 产品域名,开发者无需替换
    public static final String accessKeyId = "LTAI5tKxxwq6TLF9Hos3Uxee"; // 阿里云账号相关
    public static final String accessKeySecret = "T8eJZrSmo6I1fgjpoCLOEKpsw5Tr3d";
    public static final String signName = "HaiFit";  // 发送短信的短信签名
    // 短信模板
    public static final String SMS_TEMPLATE_REGISTER = "SMS_215200248";
    public static final String SMS_TEMPLATE_LOGIN = "SMS_215200250";
    public static final String SMS_TEMPLATE_FORGET_PWD = "SMS_215200247";
    public static final String SMS_TEMPLATE_UPDATE_PHONE = "SMS_215200246";

    public static final String CHINA_PHONE_AREA = "+86";


    public static final String SEND_DEVICE_REDIS_KEY = "sendDeviceCommandNumber";//发送给设备的指令序号

    public static final String MANUFACTURER_NAME = "WT";//指令中的制造商名称

    public static final String DEVICE_ONLINE_PREFIX = "DEVICE_ONLINE_";//redis中存储设备是否在线的前缀

    public static final String COMMAND_PREFIX = "DEVICE_COMMAND_";//redis中存储指令命令的前缀

    //高德接口的地址
    public static final String GAODE_API_URL = "http://restapi.amap.com/v3/geocode/regeo?output=JSON&location=";

    //设备指令回复消息的类型
    public static final String MESS_TYPE = "V4";
    //教师角色
    public static final int CHARGE_TEACHER = 1;//班主任
    //科任老师
    public static final int CLASSROOM_TEACHER = 2;//科任老师
    //家长角色其他parents
    public static final int PARENTS_TYPE = 4;//其他角色

    // 消息ID相关
    // 指令消息命令号(下发)
    public static final String ACTIVE_DEVICE_LOCATION = "D1";  // 主动定位监控命令
    public static final String DEVICE_PARAMETERS = "GETPARAM";  // 平台获取设备参数
    public static final String ICCID_AND_SIM = "GETICCID"; //查询设备中的sim卡号码和iccid指令
    public static final String DEVICE_IMEID = "GETIMEID"; //获取设备机身码信息
    public static final String SET_TEMPORARY_CONTROL_CENTER = "S23"; //设置临时控制中心
    public static final String SET_DEFAULT_CONTROL_CENTER = "S24"; //设置默认控制中心
    public static final String SET_WORK_MODE = "MODE"; //设置工作模式
    public static final String SET_UPLOAD_TIME = "UPLOAD"; //数据上报时间间隔设置
    public static final String AUTO_CHANGE_WORK_MODE = "SLEEPTIME"; //闲置时间自动切换工作模式
    public static final String SET_MONITOR_NUMBER = "MONITOR"; //设置监听号码
    public static final String SET_NO_DISTURB_TIME = "CLASS"; //设置免打扰时间协议
    public static final String SET_NO_DISTURB_SWITCH = "CLASSSWITCH"; //设置免打扰时间开关
    public static final String SET_PDOP_THRESHOLD_VALUE = "PDOP"; //设置PDOP门限值
    public static final String SET_NO_DISTURB_CONTROLLER = "CALLFUN"; //服务器设置使用课表或考勤标记控制设备的免打扰功能开关
    public static final String SET_SOS_DIAL_SWITCH = "SOSFUN"; //设置SOS电话拨号开关
    public static final String FACTORY_RESET = "S25"; //恢复出厂设置
    public static final String DEVICE_RESTART = "R1"; //设备重启
    public static final String SOFTWARE_TURN_OFF = "GJ"; //软件关机
    public static final String VOLUME_ADJUSTMENT = "SPEAKER"; //音量调节
    public static final String CHANGE_DEVICE_ID = "CHOOSEID"; //设备id的切换
    public static final String SINGLE_WHITELIST_NUMBER = "PBWL"; //单独设置白名单号码
    public static final String ALL_WHITELIST_NUMBER = "PBWLALL"; //一次设置所有白名单
    public static final String ALL_SOS_PHONE = "SETSOS";//一次性设置所有sos号码
    public static final String WHITELIST_SWITCH = "CALLFILTER"; //白名单功能的开关
    public static final String WIRELESS_ATTENDANCE_SWITCH = "RFSWITCH"; //无线考勤功能的开关
    public static final String CIRCLE_POSITION_SETTING = "POSTSELF"; //圆形范围的岗位/学校设置
    public static final String POLYGON_POSITION_SETTING = "POSTSELFM"; //多边形范围的岗位/学校设置
    public static final String REPLY_ELECTRONIC_SING_IN = "POSTIN"; //回复设备上报电子签到信息
    public static final String REPLY_ELECTRONIC_SING_OUT = "POSTOUT"; //回复设备上报电子签退信息
    public static final String UPGRADE_DEVICE = "UPGRADE"; //设备远程升级
    public static final String UPGRADE_UPGRADE_STATUS = "UPGRADESTATUS"; //设备升级状态上报
    public static final String SOS_WARNING = "SOS"; //设备上报SOS报警
    public static final String LOW_BATTERY_WARNING = "BLOW"; //设备低电量报警
    public static final String NOT_LOCATE_HEART = "KA"; //未定位心跳数据
    public static final String LOCATE_HEART = "V2"; //定位后的心跳数据
    public static final String ACTIVE_UPLOAD_STEP = "STEP"; //设备主动上报数据
    public static final String GET_DEVICE_STEP = "GETSTEP"; //主动获取设备记步数据
    public static final String CALL_RECORDS = "CALLNOTE"; //通话记录上报
    public static final String MONITOR_RECORDS = "MONITORNOTE"; //监听记录的上报
    public static final String DEVICE_POWER_ON = "POWERON"; //设备开机上报指令
    public static final String RESET_M1_CARD = "SETM1"; //M1卡的变更
    public static final String REMOVE_BINDING = "CLEANSIM"; //设备解除绑定
    public static final String WEATHER = "WEATHER";   // 天气回复
    public static final String WIFIMAC = "WIFIMAC";   // 开机wifi上报
    public static final String HEARTBEAT = "HEARTBEAT";   // 心跳
    public static final String SHUT_DOWN_WARNING = "SHUTDOWN";   // 关机
    public static final String SHUT_DOWN_SILENT = "GJSILENT";   // 关机静默
    public static final String DEVICE_BINDING_STATUS = "BINDINGSTATUS";   // 喜马拉雅绑定状态
    public static final String CLOSE_CHANNEL = "CLOSECHANNEL";   // 关闭未绑定设备的通道
    public static final String ALARM_CLOCK = "ALARMCLOCK";   // 设备闹钟设置
    public static final String DELETE_CLOCK = "DELCLOCK";   // 删除设备闹钟
    public static final String SEND_TEXT = "TEXTINFORM";   // 发送文本信息
    public static final String VCOM_NOT_DISTURB = "NOTDISTURB";   // 威科姆免打扰
    public static final String VCOM_NOTICE_MESSAGE = "NOTICEMESSAGE";   // 威科姆免通知消息
    public static final String VCOM_SHORT_MESSAGE = "SHORTMESSAGE";   // 威科姆短消息
    public static final String DELETE_REDIS_COMMAND="DELETEREDISCOMMAND";//用于下发删除redis指令
    public static final String GET_LT_AUTH_KEY="GETLTAUTHKEY";//vcom设备用于获取联通密匙
    public static final String GET_PHONE="GETPHONE";//获取手机号
    public static final String UPLOAD_APP="UPLOADAPP";//上传app信息
    public static final String UPLOAD_APP_FILE="UPLOADAPPFILE";//上传app文件
    public static final String APP_INSTALLATION="APPDOWNLOAD";//app下载安装
    public static final String APP_DISABLE="APPDISABLE";//app禁用
    public static final String LOCK_NET="LOCKNET";//设备锁网
    public static final String LOCK_CARD="LOCKCARD";//设备锁卡
    public static final String LOCK_DEVICE="LOCKDEVICE";//锁机
    public static final String GET_LOCK_NET="GETLOCKNET";//获取锁网状态
    public static final String GET_LOCK_CARD="GETLOCKCARD";//获取锁卡状态
    public static final String GET_LOCK_DEVICE="GETLOCKDEVICE";//获取锁定设备状态
    //考勤机指令cmd
    public static final String IDENTITY = "A4";   // 身份注册
    public static final String TIME_CHECK = "A3";   // 时间校准
    public static final String HEART_BEAT = "A2";   // 心跳上报
    public static final String SEND_DATA = "A7";   // 进出校数据传输

    //考勤机通讯通道保存前缀
    public static final String ATTENDANCE_ONLINE_PRE = "ATTENDANCE_";


    // 指令拓展(共用指令，但是操作不同的。例如课堂模式增删改)
    public static final String DEL_CLASS_MODE = "DEL_CLASS_MODE";
    public static final String UPDATE_CLASS_MODE = "UPDATE_CLASS_MODE";
    public static final String UPDATE_WHITE_CALL = "UPDATE_WHITE_CALL";
    public static final String DEL_WHITE_CALL = "DEL_WHITE_CALL";

    //课堂模式状态
    public static final int CLASSES_PATTERN_NORMAl = 1;//正常
    public static final int CLASSES_PATTERN_STAY_ADD = 2;//待添加
    public static final int CLASSES_PATTERN_STAY_DELETE = 3;//待删除
    public static final int CLASSES_PATTERN_STAY_UPDATE = 4;//待修改

    //白名单状态
    public static final int DEVICE_WHITE_NORMAl = 1;//正常
    public static final int DEVICE_WHITE_STAY_ADD = 2;//待添加
    public static final int DEVICE_WHITE_DELETE = 3;//待删除
    public static final int DEVICE_WHITE_STAY_UPDATE = 4;//待修改

    //闹钟状态
    public static final int DEVICE_ALARM_NORMAl = 1;//正常
    public static final int DEVICE_ALARM_STAY_ADD = 2;//待添加
    public static final int DEVICE_ALARM_DELETE = 3;//待删除
    public static final int DEVICE_ALARM_STAY_UPDATE = 4;//待修改

    //标记亲情号的起始位置
    public static final int DEVICE_LOVE_PHONE_START = 4;
    public static final int DEVICE_LOVE_PHONE_END = 6;


    //SOS号码状态
    public static final int DEVICE_SOS_NORMAl = 1;//正常
    public static final int DEVICE_SOS_STAY_ADD = 2;//待添加
    public static final int DEVICE_SOS_DELETE = 3;//待删除
    public static final int DEVICE_SOS_STAY_UPDATE = 4;//待修改


    //白名单状态
    public static final int WHITE_PATTERN_NORMAl = 1;//正常
    public static final int WHITE_PATTERN_STAY_ADD = 2;//待添加
    public static final int WHITE_PATTERN_STAY_DELETE = 3;//待删除
    public static final int WHITE_PATTERN_STAY_UPDATE = 4;//待修改

    //睡眠模式
    public static final int SLEEP_SWITCH_OPEN = 1;//开睡眠模式
    public static final int SLEEP_SWITCH_CLOSE = 0;//关睡眠模式
    public static final String SLEEP_DEFAULT_START = "23:00";//睡眠模式默认开始时间
    public static final String SLEEP_DEFAULT_END = "06:00";//睡眠模式默认结束时间


    //静默关机
    public static final int SILENT_SHUTDOWN_OPEN = 1;//开静默关机模式
    public static final int SILENT_SHUTDOWN_CLOSE = 0;//关静默关机模式

    // 指令状态
    public static final int COMMAND_NOT_RESPONSE = 1;
    public static final int COMMAND_SEND_FAILED = 2;
    public static final int COMMAND_NO_SAVE = 3;
    public static final int COMMAND_NEED_SAVE = 4;

    // 指令发送状态  0-待发送 1-发送中 2-完成 3-失败
    public static final int COMMAND_WAITING_SEND = 0;
    public static final int COMMAND_SENDING = 1;
    public static final int COMMAND_COMPLETE = 2;
    public static final int COMMAND_FAILED = 3;

    //白名单
    public static final int WHITE_CALL = 0;
    //情亲号
    public static final int LOVER_CALL = 1;


    // 指令发送类型 1-在线 2-离线
    public static final int COMMAND_ONLINE = 1;
    public static final int COMMAND_OFFLINE = 2;

    // 设置临时、默认IP和端口时的重试次数
    public static final int TEMP_RETRY_COUNT = 5;
    public static final int DEFAULT_RETRY_COUNT = 255;

    // 客户token前缀
    public static final String CUSTOMER_TOKEN_PREFIX = "customer_";
    // 推送数据给客户需要的token的存储前缀
    public static final String PUSH_TO_CUSTOMER_TOKEN_PREFIX = "PUSH_TOKEN_";

    //告警类型
    public static final Integer SOS_WARNING_TYPE = 1;
    public static final Integer LOW_BATTERY_WARNING_TYPE = 2;
    public static final Integer ENTER_FENCE_WARNING_TYPE = 3;
    public static final Integer LEFT_WARNING_TYPE = 4;
    public static final Integer SHUT_DOWN_WARNING_TYPE = 6;
    public static final Integer POWER_ON_WARNING_TYPE = 7;

    //围栏的告警类型
    public static final Integer ENTER_WARNING = 1;
    public static final Integer LEFT_WARNING = 2;
    public static final Integer ENTER_AND_LEFT = 3;

    //设备默认的工作模式和上报间隔（用于恢复出厂设置时）
    public static final int DEFAULT_WORK_PATTERN = 1;//实时定位模式
    public static final int UP_INTERVAL = 180;//设备默认上传时间间隔

    public static final int POWER_SAVING_MODEL = 2;//省电模式

    public static final int POWER_SAVING_MODEL_UP_INTERVAL = 600;//省电模式默认时间间隔


    // appKey状态
    public static final Integer DISABLED = 1;
    public static final Integer USE = 0;


    public static final int OPERATOR_ADD = 1;
    public static final int OPERATOR_UPDATE = 2;
    public static final int OPERATOR_DEL = 3;

    public static final int SWITCH_TYPE_SOS = 1;
    public static final int SWITCH_TYPE_CLASS_PATTERN = 2;
    public static final int SWITCH_TYPE_WHITE_CALL = 3;

    public static final int PUSH_INVALID = 0;
    public static final int PUSH_VERIFYING = 1;
    public static final int PUSH_EFFECT = 2;

    // 微信公众号中设备状态  0-未绑定设备 1-在线 2-离线
    public static final int WX_DEVICE_NOT_FOUND = 0;
    public static final int WX_DEVICE_ONLINE = 1;
    public static final int WX_DEVICE_OFFLINE = 2;

    // H5Token前缀
    public static final String H5_TOKEN_PREFIX = "H5TOKEN_";

    //微信公众号进行指令下发时存储的用户id
    public static final int WX_COMMAND_USER_ID = -1;

    //h5用户进行指令下发时存储的用户id
    public static final int H5_COMMAND_USER_ID = -2;

    public static final int PLATFORM_DEVICE = 1;
    public static final int CUSTOMER_DEVICE = 2;
    public static final int H5_DEVICE = 3;
    public static final int HXY_DEVICE = 4;
    public static final int VCOM_DEVICE = 5;

    //推送资讯和班级通知的区分
    public static final int PUSH_NOTIFICATION = 1;
    public static final int PUSH_INFORMATION = 2;

    //设备的绑定状态
    public static final int DEVICE_BINDING_UNREGISTERED = 0;
    public static final int DEVICE_BINDING = 2;
    public static final int DEVICE_UNBINDING = 1;

    //公众号教师学生类型
    public static final String WATER_USER_TYPE_PREFIX = "_type_water";
    public static final int TEACHER_TYPE = 1;
    public static final int PARENT_TYPE = 0;

    //告警类型消息是否最新存储前缀（公众号）
    public static final String WARN_TYPE_IS_NEW = "WARN_IS_NEW_";
    //告警类型消息是否最新存储前缀（h5）
    public static final String WARN_TYPE_IS_NEW_H5 = "WARN_IS_NEW_H5_";

    //未入库存储的设备imei的前缀
    public static final String UN_STORAGE_DEVICE = "UN_STORAGE_DEVICE";

    //此处用于设备日志

    //平台
    public static final Integer WEB_USER = 1;

    //设备
    public static final Integer DEVICE_USER = 2;

    public static final String YPT_A6_ORG_CODE = "A01A46";

}
